/**
 *@Time    : 2021/10/15 11:58
 *@Author  : Shuai Jhou
 *@File    : service
 *@Software: GoLand
 */

package service

import (
	"context"
	"go.zhoushuai.cn/go-programming-tour-book/blog-service/global"
	"go.zhoushuai.cn/go-programming-tour-book/blog-service/internal/dao"
)

type Service struct {
	ctx context.Context
	dao *dao.Dao
}

func New(ctx context.Context) Service {
	svc := Service{ctx: ctx}
	svc.dao = dao.New(global.DBEngine)
	return svc
}
